<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
   
</head>
<body>
    <input type="button" value="get请求数据" id="btnGet">
    <input type="button" value="post请求数据" id="btnPost">

    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script>
         axios({
        url:"https://mock.apifox.cn/m1/3083103-0-default/emps/list",
        method:'GET'
    }).then((result) =>{
        console.log(result.data)
    }).catch((err)=>{
        console.log(err)
    })

    axios({
        url:"https://mock.apifox.cn/m1/3083103-0-default/emps/update",
        method:'POST',
        data:'id=1' 
    }).then((result) =>{
        console.log(result)
    }).catch((err)=>{
        console.log(err)
    })
    </script>
   
</body>
</html>